// 获取页面滚动是否到达底部
export const getRollLength = () => {
  //变量scrollTop是滚动条滚动时，距离顶部的距离
  let scrollTop =
    document.documentElement.scrollTop || document.body.scrollTop;
  //变量windowHeight是可视区的高度
  let windowHeight =
    document.documentElement.clientHeight || document.body.clientHeight;
  //变量scrollHeight是滚动条的总高度
  let scrollHeight =
    document.documentElement.scrollHeight || document.body.scrollHeight;
  // 判断是否触底
  if (scrollTop + windowHeight >= scrollHeight) return true
}